.PHONY: clean test
CC = arm-linux-gcc
CFLAGS = -I./inc


SRCS=$(wildcard src/*.c)

OBJS=$(subst .c,.o,$(SRCS))


all: main.c $(OBJS)
	$(CC) -o main main.c $(OBJS) $(CFLAGS)
	@echo "build success"



$(OBJS):%.o:%.c 
	$(CC) -c $^ -o $@  $(CFLAGS)


clean:
	rm -rf  main $(OBJS)


test:
	@echo "test"
	@echo $(SRCS)
	@echo $(OBJS)

# make src/a.o
# arm-linux-gcc -c src/a.c -o src/a.o -I ./inc

# make src/bmp24.o
# arm-linux-gcc -c src/bmp24.c -o src/bmp24.o -I ./inc

# make all
# arm-linux-gcc -o main main.c src/a.o src/bmp24.o -I ./inc


# make clean
# rm -rf  main src/a.o src/bmp24.o
